package com.zdb.demo.design.pattern.behavioral.chainofresponsibility.demo1;

public class ProjectManager extends Handler {

    @Override public String handleFeeRequest(String user, double fee) {
        if(fee < 500) {
            String str = "";
            if ("小李".equals(user)) {
                str = String.format("项目经理【同意】%s聚餐费用%f元的请求", user, fee);
            } else {
                str = String.format("项目经理【不同意】%s聚餐费用%f元的请求", user, fee);
            }
            return str;
        } else {
            if(nextHandler != null) {
                return nextHandler.handleFeeRequest(user, fee);
            }
            return "没人处理";
        }
    }
}
